Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vite: Improve handling of preview annotations #28798

Open
wants to merge 41 commits into
base: next
Choose a base branch
from

Conversation

tobiasdiez
Copy link
Contributor

@tobiasdiez tobiasdiez commented Aug 3, 2024

What I did

While working on the Nuxt integration, I noticed a couple of issues with how the preview annotations are handled. Namely:

  • Vite seems to not analyze / transpile the preview imports: Not sure why this is the case, but I believe it's the origin of Could not resolve "virtual:nuxt-runtime-config" nuxt-modules/storybook#718. I've changed the dynamic imports to absolute ones. Now imports are correctly analyzed also in dev-mode, which made it necessary to include a few optimizeDeps (one of them is from Vite: Add jsdoc-type-pratt-parser to optimizeDeps #29179).
  • Deep imports in node_modules like node_modules/packageA/node_modules/storybook are truncated to the last package ( storybook in the example), which then cannot be resolved. This is fixed by always resolving the preview annotation paths to absolute paths and using them. The code contained a few remarks that vite appearently has problems with absolute paths, but as far as I'm aware vite handles absolute paths perfectly fine.
  • What results in errors, however, are absolute paths on Windows that use \ as path separator. This is fixed by using normalize from the pathe package, which converts this to /.

The code to create the preview annotation imports is inspired by https://github.com/nuxt/nuxt/blob/754fc30e5d0fe506ee3218f9c4a11fa047e3553f/packages/nuxt/src/core/templates.ts#L61-L76

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

Manual testing

I've run and added a few tests. Still have to figure out how to test the sandboxes.

This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli/src/sandbox-templates.ts

  • Make sure this PR contains one of the labels below:

    Available labels
    • bug: Internal changes that fixes incorrect behavior.
    • maintenance: User-facing maintenance tasks.
    • dependencies: Upgrading (sometimes downgrading) dependencies.
    • build: Internal-facing build tooling & test updates. Will not show up in release changelog.
    • cleanup: Minor cleanup style change. Will not show up in release changelog.
    • documentation: Documentation only changes. Will not show up in release changelog.
    • feature request: Introducing a new feature.
    • BREAKING CHANGE: Changes that break compatibility in some way with current major version.
    • other: Changes that don't fit in the above categories.

🦋 Canary release

This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the @storybookjs/core team here.

core team members can create a canary release here or locally with gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=<PR_NUMBER>

name before after diff z %
createSize 0 B 0 B 0 B - -
generateSize 77.7 MB 77.7 MB 0 B 1.11 0%
initSize 136 MB 136 MB 4.35 kB 1.11 0%
diffSize 58.4 MB 58.4 MB 4.35 kB 1.11 0%
buildSize 7.24 MB 7.39 MB 155 kB 1.76 2.1%
buildSbAddonsSize 1.88 MB 1.88 MB 0 B 0.9 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 1.86 MB 1.86 MB 0 B 0.83 0%
buildSbPreviewSize 0 B 0 B 0 B - -
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 3.93 MB 3.93 MB 0 B 0.9 0%
buildPreviewSize 3.3 MB 3.46 MB 155 kB 2049.49 4.5%
testBuildSize 0 B 0 B 0 B - -
testBuildSbAddonsSize 0 B 0 B 0 B - -
testBuildSbCommonSize 0 B 0 B 0 B - -
testBuildSbManagerSize 0 B 0 B 0 B - -
testBuildSbPreviewSize 0 B 0 B 0 B - -
testBuildStaticSize 0 B 0 B 0 B - -
testBuildPrebuildSize 0 B 0 B 0 B - -
testBuildPreviewSize 0 B 0 B 0 B - -
name before after diff z %
createTime 8s 20.5s 12.5s 0.75 60.9%
generateTime 20.2s 19.9s -331ms -0.44 -1.7%
initTime 14.5s 13.6s -957ms -0.5 -7%
buildTime 11.9s 9.2s -2s -632ms -0.22 -28.4%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 5.6s 5.7s 90ms 1.01 1.6%
devManagerResponsive 4.1s 4.1s -60ms 0.58 -1.5%
devManagerHeaderVisible 748ms 626ms -122ms 0.41 -19.5%
devManagerIndexVisible 770ms 633ms -137ms -0.13 -21.6%
devStoryVisibleUncached 1.9s 2.3s 414ms 2.34 🔺17.3%
devStoryVisible 792ms 1s 209ms 4.38 🔺20.9%
devAutodocsVisible 501ms 849ms 348ms 5.59 🔺41%
devMDXVisible 578ms 959ms 381ms 5.33 🔺39.7%
buildManagerHeaderVisible 642ms 873ms 231ms 4.03 🔺26.5%
buildManagerIndexVisible 744ms 893ms 149ms 2.6 🔺16.7%
buildStoryVisible 603ms 838ms 235ms 4.64 🔺28%
buildAutodocsVisible 504ms 762ms 258ms 6.16 🔺33.9%
buildMDXVisible 475ms 798ms 323ms 5.31 🔺40.5%

Greptile Summary

Improved handling of preview annotations in the Vite builder for Storybook, addressing path normalization and import issues.

  • code/builders/builder-vite/package.json: Added knitwork, pathe, and slash dependencies for better path handling.
  • code/builders/builder-vite/src/codegen-modern-iframe-script.ts: Updated to generate absolute paths for preview annotations and improved HMR logic.
  • code/builders/builder-vite/src/utils/process-preview-annotation.ts: Replaced path with pathe for normalization and added deprecation warning for object-based annotations.
  • code/builders/builder-vite/src/codegen-modern-iframe-script.test.ts: Added unit tests for generateModernIframeScriptCodeFromPreviews.
  • code/builders/builder-vite/src/utils/process-preview-annotation.test.ts: Updated tests to ensure correct path handling, especially for Windows paths.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

5 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

Copy link

nx-cloud bot commented Aug 3, 2024

View your CI Pipeline Execution ↗ for commit ba7be49.

Command Status Duration Result
nx run-many -t build --parallel=3 ✅ Succeeded 1m 36s View ↗

☁️ Nx Cloud last updated this comment at 2024-12-27 15:32:07 UTC

@ndelangen ndelangen added the ci:daily Run the CI jobs that normally run in the daily job. label Aug 5, 2024
@ndelangen
Copy link
Member

Thank you for the PR @tobiasdiez.

Could you have a look at why the CI is failing?

@tobiasdiez
Copy link
Contributor Author

Could you have a look at why the CI is failing?

Tests are passing now.

@ndelangen ndelangen changed the title Vite: improve handling of preview annotations Vite: Improve handling of preview annotations Aug 14, 2024
@ndelangen
Copy link
Member

@tobiasdiez I think I may have broken something when i merged in the base branch, but I'm not sure what.

Can you assist?

@tobiasdiez
Copy link
Contributor Author

@tobiasdiez I think I may have broken something when i merged in the base branch, but I'm not sure what.

Can you assist?

Thanks for your help!

The tests should pass now, but there are ts errors during build. I have no idea where they are coming from. Do you?

@tobiasdiez
Copy link
Contributor Author

Managed to fix the tests, so this is good to go from my side.

@ndelangen @tmeasday please review when you have a bit of spare time. Thanks!

Copy link
Member

@tmeasday tmeasday left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need someone who is more familiar with the vite builder to review this.

I have a couple qns:

Are we absolutely (haha) sure the absolute paths don't end up in the bundle anywhere? I'd like to verify this.

This is fixed by using normalize from the pathe package, which converts this to /."

Should we use slash for this which is an existing dependency?

@tobiasdiez
Copy link
Contributor Author

This is fixed by using normalize from the pathe package, which converts this to /."

Should we use slash for this which is an existing dependency?

pathe does a few more things than just normalizing slashes. For example, it correctly produces a relative path of c:\root\storybook against C:\root although the drive letter have different cases. But apart from these edge cases it is equivalent to slash + node:path. The main added value of pathe is that you don't have to constantly think about path normalizating on windows before you call the method from node:path. So my proposal would be to actually replace slash by pathe everywhere in the project.

Copy link
Contributor

@kasperpeulen kasperpeulen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@storybook-pr-benchmarking
Copy link

storybook-pr-benchmarking bot commented Dec 3, 2024

Package Benchmarks

Commit: ba7be49, ran on 27 December 2024 at 15:38:27 UTC

The following packages have significant changes to their size or dependencies:

@storybook/addon-storysource

Before After Difference
Dependency count 7 7 0
Self size 1.89 MB 1.89 MB 0 B
Dependency size 10.70 MB 10.74 MB 🚨 +43 KB 🚨
Bundle Size Analyzer Link Link

@storybook/cli

Before After Difference
Dependency count 393 393 0
Self size 496 KB 496 KB 0 B
Dependency size 77.68 MB 77.72 MB 🚨 +44 KB 🚨
Bundle Size Analyzer Link Link

@storybook/codemod

Before After Difference
Dependency count 273 273 0
Self size 612 KB 612 KB 0 B
Dependency size 67.58 MB 67.62 MB 🚨 +43 KB 🚨
Bundle Size Analyzer Link Link

@storybook/source-loader

Before After Difference
Dependency count 5 5 0
Self size 41 KB 41 KB 0 B
Dependency size 10.64 MB 10.68 MB 🚨 +43 KB 🚨
Bundle Size Analyzer Link Link

@tobiasdiez
Copy link
Contributor Author

I tried to see if I can fix the CI errors, but running yarn start locally yields:

X [ERROR] Missing "./vite" specifier in "@testing-library/svelte" package [plugin externalize-deps]

    node_modules/esbuild/lib/main.js:1225:27:
      1225 │         let result = await callback({
           ╵                            ^

    at e (file:///D:/Programming/storybook/code/node_modules/vite/dist/node/chunks/dep-68d1a114.js:21445:25)
    at n (file:///D:/Programming/storybook/code/node_modules/vite/dist/node/chunks/dep-68d1a114.js:21445:627)
    at o (file:///D:/Programming/storybook/code/node_modules/vite/dist/node/chunks/dep-68d1a114.js:21445:1297)
    at resolveExportsOrImports (file:///D:/Programming/storybook/code/node_modules/vite/dist/node/chunks/dep-68d1a114.js:28746:20)
    at resolveDeepImport (file:///D:/Programming/storybook/code/node_modules/vite/dist/node/chunks/dep-68d1a114.js:28765:31)
    at tryNodeResolve (file:///D:/Programming/storybook/code/node_modules/vite/dist/node/chunks/dep-68d1a114.js:28453:20)
    at resolveByViteResolver (file:///D:/Programming/storybook/code/node_modules/vite/dist/node/chunks/dep-68d1a114.js:66224:32)
    at file:///D:/Programming/storybook/code/node_modules/vite/dist/node/chunks/dep-68d1a114.js:66265:40
    at requestCallbacks.on-resolve (D:\Programming\storybook\code\node_modules\esbuild\lib\main.js:1225:28)
    at handleRequest (D:\Programming\storybook\code\node_modules\esbuild\lib\main.js:647:17)

  This error came from the "onResolve" callback registered here:

    node_modules/esbuild/lib/main.js:1150:20:
      1150 │       let promise = setup({
           ╵                     ^

    at setup (file:///D:/Programming/storybook/code/node_modules/vite/dist/node/chunks/dep-68d1a114.js:66250:27)
    at handlePlugins (D:\Programming\storybook\code\node_modules\esbuild\lib\main.js:1150:21)
    at buildOrContextImpl (D:\Programming\storybook\code\node_modules\esbuild\lib\main.js:873:5)
    at Object.buildOrContext (D:\Programming\storybook\code\node_modules\esbuild\lib\main.js:699:5)
    at D:\Programming\storybook\code\node_modules\esbuild\lib\main.js:2024:15
    at new Promise (<anonymous>)
    at Object.build (D:\Programming\storybook\code\node_modules\esbuild\lib\main.js:2023:25)
    at build (D:\Programming\storybook\code\node_modules\esbuild\lib\main.js:1874:51)
    at bundleConfigFile (file:///D:/Programming/storybook/code/node_modules/vite/dist/node/chunks/dep-68d1a114.js:66201:26)

  The plugin "externalize-deps" was triggered by this import

    renderers/svelte/vitest.config.ts:10:13:
      10 │       import('@testing-library/svelte/vite').then(({ svelteTesting...
         ╵              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

failed to load config from D:\Programming\storybook\code\renderers\svelte\vitest.config.ts
Unable to create nodes for renderers/svelte/vitest.config.ts using plugin @nx/vite/plugin.

         Inner Error: Error: Build failed with 1 error:
node_modules/esbuild/lib/main.js:1225:27: ERROR: [plugin: externalize-deps] Missing "./vite" specifier in "@testing-library/svelte" package
    at failureErrorWithLog (D:\Programming\storybook\code\node_modules\esbuild\lib\main.js:1472:15)
    at D:\Programming\storybook\code\node_modules\esbuild\lib\main.js:945:25
    at runOnEndCallbacks (D:\Programming\storybook\code\node_modules\esbuild\lib\main.js:1315:45)
    at buildResponseToResult (D:\Programming\storybook\code\node_modules\esbuild\lib\main.js:943:7)
    at D:\Programming\storybook\code\node_modules\esbuild\lib\main.js:970:16
    at responseCallbacks.<computed> (D:\Programming\storybook\code\node_modules\esbuild\lib\main.js:622:9)
    at handleIncomingPacket (D:\Programming\storybook\code\node_modules\esbuild\lib\main.js:677:12)
    at Socket.readFromStdout (D:\Programming\storybook\code\node_modules\esbuild\lib\main.js:600:7)
    at Socket.emit (node:events:513:28)
    at addChunk (node:internal/streams/readable:559:12)

 NX   Unable to create nodes for renderers/svelte/vitest.config.ts using plugin @nx/vite/plugin.


         Inner Error: Error: Build failed with 1 error:
node_modules/esbuild/lib/main.js:1225:27: ERROR: [plugin: externalize-deps] Missing "./vite" specifier in "@testing-library/svelte" package
    at failureErrorWithLog (D:\Programming\storybook\code\node_modules\esbuild\lib\main.js:1472:15)
    at D:\Programming\storybook\code\node_modules\esbuild\lib\main.js:945:25
    at runOnEndCallbacks (D:\Programming\storybook\code\node_modules\esbuild\lib\main.js:1315:45)
    at buildResponseToResult (D:\Programming\storybook\code\node_modules\esbuild\lib\main.js:943:7)
    at D:\Programming\storybook\code\node_modules\esbuild\lib\main.js:970:16
    at responseCallbacks.<computed> (D:\Programming\storybook\code\node_modules\esbuild\lib\main.js:622:9)
    at handleIncomingPacket (D:\Programming\storybook\code\node_modules\esbuild\lib\main.js:677:12)
    at Socket.readFromStdout (D:\Programming\storybook\code\node_modules\esbuild\lib\main.js:600:7)
    at Socket.emit (node:events:513:28)
    at addChunk (node:internal/streams/readable:559:12)

    at makeError (D:\Programming\storybook\scripts\node_modules\execa\lib\error.js:59:13)
    at handlePromise (D:\Programming\storybook\scripts\node_modules\execa\index.js:119:50)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async exec (D:\Programming\storybook\scripts\utils\exec.ts:43:7)
    at async runTask (D:\Programming\storybook\scripts\task.ts:317:24)
    at async run (D:\Programming\storybook\scripts\task.ts:474:28) {
  shortMessage: 'Command failed with exit code 1: npx nx run-many -t build --parallel=15',
  command: 'npx nx run-many -t build --parallel=15',
  escapedCommand: '"npx nx run-many -t build --parallel=15"',
  exitCode: 1,
  signal: undefined,
  signalDescription: undefined,
  stdout: '\r\n' +
    ' NX   Unable to create nodes for renderers/svelte/vitest.config.ts using plugin @nx/vite/plugin. \r\n' +
    '\r\n' +
    '\r\n' +
    '\t Inner Error: Error: Build failed with 1 error:\r\n' +
    'node_modules/esbuild/lib/main.js:1225:27: ERROR: [plugin: externalize-deps] Missing "./vite" specifier in "@testing-library/svelte" package\r\n' +
    '    at failureErrorWithLog (D:\\Programming\\storybook\\code\\node_modules\\esbuild\\lib\\main.js:1472:15)\r\n' +
    '    at D:\\Programming\\storybook\\code\\node_modules\\esbuild\\lib\\main.js:945:25\r\n' +
    '    at runOnEndCallbacks (D:\\Programming\\storybook\\code\\node_modules\\esbuild\\lib\\main.js:1315:45)\r\n' +
    '    at buildResponseToResult (D:\\Programming\\storybook\\code\\node_modules\\esbuild\\lib\\main.js:943:7)\r\n' +
    '    at D:\\Programming\\storybook\\code\\node_modules\\esbuild\\lib\\main.js:970:16\r\n' +
    '    at responseCallbacks.<computed> (D:\\Programming\\storybook\\code\\node_modules\\esbuild\\lib\\main.js:622:9)\r\n' +
    '    at handleIncomingPacket (D:\\Programming\\storybook\\code\\node_modules\\esbuild\\lib\\main.js:677:12)\r\n' +
    '    at Socket.readFromStdout (D:\\Programming\\storybook\\code\\node_modules\\esbuild\\lib\\main.js:600:7)\r\n' +
    '    at Socket.emit (node:events:513:28)\r\n' +
    '    at addChunk (node:internal/streams/readable:559:12)\r\n',
  stderr: '(node:58280) ExperimentalWarning: CommonJS module C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\debug\\src\\node.js is loading ES Module C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\supports-color\\index.js using require().\n' +
    'Support for loading ES Module in require() is an experimental feature and might change at any time\n' +
    '(Use `node --trace-warnings ...` to show where the warning was created)\n' +
    "\x1B[33mThe CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.\x1B[39m\n" +
    'X [ERROR] Missing "./vite" specifier in "@testing-library/svelte" package [plugin externalize-deps]\n' +
    '\n' +
    '    node_modules/esbuild/lib/main.js:1225:27:\n' +
    '      1225 │         let result = await callback({\n' +
    '           ╵                            ^\n' +
    '\n' +
    '    at e (file:///D:/Programming/storybook/code/node_modules/vite/dist/node/chunks/dep-68d1a114.js:21445:25)\n' +
    '    at n (file:///D:/Programming/storybook/code/node_modules/vite/dist/node/chunks/dep-68d1a114.js:21445:627)\n' +
    '    at o (file:///D:/Programming/storybook/code/node_modules/vite/dist/node/chunks/dep-68d1a114.js:21445:1297)\n' +
    '    at resolveExportsOrImports (file:///D:/Programming/storybook/code/node_modules/vite/dist/node/chunks/dep-68d1a114.js:28746:20)\n' +
    '    at resolveDeepImport (file:///D:/Programming/storybook/code/node_modules/vite/dist/node/chunks/dep-68d1a114.js:28765:31)\n' +
    '    at tryNodeResolve (file:///D:/Programming/storybook/code/node_modules/vite/dist/node/chunks/dep-68d1a114.js:28453:20)\n' +
    '    at resolveByViteResolver (file:///D:/Programming/storybook/code/node_modules/vite/dist/node/chunks/dep-68d1a114.js:66224:32)\n' +
    '    at file:///D:/Programming/storybook/code/node_modules/vite/dist/node/chunks/dep-68d1a114.js:66265:40\n' +
    '    at requestCallbacks.on-resolve (D:\\Programming\\storybook\\code\\node_modules\\esbuild\\lib\\main.js:1225:28)\n' +
    '    at handleRequest (D:\\Programming\\storybook\\code\\node_modules\\esbuild\\lib\\main.js:647:17)\n' +
    '\n' +
    '  This error came from the "onResolve" callback registered here:\n' +
    '\n' +
    '    node_modules/esbuild/lib/main.js:1150:20:\n' +
    '      1150 │       let promise = setup({\n' +
    '           ╵                     ^\n' +
    '\n' +
    '    at setup (file:///D:/Programming/storybook/code/node_modules/vite/dist/node/chunks/dep-68d1a114.js:66250:27)\n' +
    '    at handlePlugins (D:\\Programming\\storybook\\code\\node_modules\\esbuild\\lib\\main.js:1150:21)\n' +
    '    at buildOrContextImpl (D:\\Programming\\storybook\\code\\node_modules\\esbuild\\lib\\main.js:873:5)\n' +
    '    at Object.buildOrContext (D:\\Programming\\storybook\\code\\node_modules\\esbuild\\lib\\main.js:699:5)\n' +
    '    at D:\\Programming\\storybook\\code\\node_modules\\esbuild\\lib\\main.js:2024:15\n' +
    '    at new Promise (<anonymous>)\n' +
    '    at Object.build (D:\\Programming\\storybook\\code\\node_modules\\esbuild\\lib\\main.js:2023:25)\n' +
    '    at build (D:\\Programming\\storybook\\code\\node_modules\\esbuild\\lib\\main.js:1874:51)\n' +
    '    at bundleConfigFile (file:///D:/Programming/storybook/code/node_modules/vite/dist/node/chunks/dep-68d1a114.js:66201:26)\n' +
    '\n' +
    '  The plugin "externalize-deps" was triggered by this import\n' +
    '\n' +
    '    renderers/svelte/vitest.config.ts:10:13:\n' +
    "      10 │       import('@testing-library/svelte/vite').then(({ svelteTesting...\n" +
    '         ╵              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n' +
    '\n' +
    '\x1B[31mfailed to load config from D:\\Programming\\storybook\\code\\renderers\\svelte\\vitest.config.ts\x1B[39m\n' +
    'Unable to create nodes for renderers/svelte/vitest.config.ts using plugin @nx/vite/plugin. \n' +
    '\n' +
    '\t Inner Error: Error: Build failed with 1 error:\n' +
    'node_modules/esbuild/lib/main.js:1225:27: ERROR: [plugin: externalize-deps] Missing "./vite" specifier in "@testing-library/svelte" package\n' +
    '    at failureErrorWithLog (D:\\Programming\\storybook\\code\\node_modules\\esbuild\\lib\\main.js:1472:15)\n' +
    '    at D:\\Programming\\storybook\\code\\node_modules\\esbuild\\lib\\main.js:945:25\n' +
    '    at runOnEndCallbacks (D:\\Programming\\storybook\\code\\node_modules\\esbuild\\lib\\main.js:1315:45)\n' +
    '    at buildResponseToResult (D:\\Programming\\storybook\\code\\node_modules\\esbuild\\lib\\main.js:943:7)\n' +
    '    at D:\\Programming\\storybook\\code\\node_modules\\esbuild\\lib\\main.js:970:16\n' +
    '    at responseCallbacks.<computed> (D:\\Programming\\storybook\\code\\node_modules\\esbuild\\lib\\main.js:622:9)\n' +
    '    at handleIncomingPacket (D:\\Programming\\storybook\\code\\node_modules\\esbuild\\lib\\main.js:677:12)\n' +
    '    at Socket.readFromStdout (D:\\Programming\\storybook\\code\\node_modules\\esbuild\\lib\\main.js:600:7)\n' +
    '    at Socket.emit (node:events:513:28)\n' +
    '    at addChunk (node:internal/streams/readable:559:12)',
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false

Also, how do I run vitest on a single file? I thought yarn vitest <...> works but vitest is not listed as a dependency in the main package.json, so this is not working. The VSCode extensions tries to pick up code\.storybook\vitest.config.ts, which I'm not sure is right either.

@tobiasdiez
Copy link
Contributor Author

Is there anything I can do to get this merged soon? It's the last annoying issue for the nuxt module (at least for now ;-))

This should also fix #29620 and thus may replace #29639 @valentinpalkovic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug builder-vite ci:daily Run the CI jobs that normally run in the daily job.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants